package com.lsq.service;

import com.lsq.annotation.LsqValue;
import com.spring.BeanNameAware;
import com.spring.InitializingBean;
import com.spring.annotation.Autowired;
import com.spring.annotation.Component;
import com.spring.annotation.Lazy;
import com.spring.annotation.Scope;

/**
 * 请描述当前类的作用
 *
 * @author LSQ
 * @since 2023/2/13 19:39
 */
@Lazy
@Scope("singleton")
@Component("userService")
public class UserService implements InitializingBean, UserInterface, BeanNameAware {

    @Autowired
    private OrderService orderService;

    @LsqValue("lsq666")
    private String value;

    private String beanName;


    @Override
    public void test() {
        System.out.println("Hello UserService...");
        System.out.println("orderService=" + orderService);
        System.out.println("value=" + value);
        System.out.println("beanName=" + beanName);
    }

    @Override
    public void afterPropertiesSet() {
        System.out.println("UserService 初始化...");
    }


    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }
}
